Fluent Assertions Documentation
FluentAssertions.Equivalency Namespace / EquivalencyOptions<TExpectation> Class / WithMapping Method / WithMapping<TNestedExpectation,TNestedSubject>(Expression<Func<TNestedExpectation,Object>>,Expression<Func<TNestedSubject,Object>>) Method
A field or property expression indicating the member to map from.
A field or property expression indicating the member to map to.
In This Topic
    WithMapping<TNestedExpectation,TNestedSubject>(Expression<Func<TNestedExpectation,Object>>,Expression<Func<TNestedSubject,Object>>) Method
    In This Topic
    Maps a direct property or field of type TNestedExpectation to a direct property or field of TNestedSubject using lambda expressions.
    Syntax

    Parameters

    expectationMember
    A field or property expression indicating the member to map from.
    subjectMember
    A field or property expression indicating the member to map to.

    Type Parameters

    TNestedExpectation
    TNestedSubject
    Remarks
    Only direct members of TNestedExpectation and TNestedSubject can be mapped to each other. Those types can appear anywhere in the object graphs that are being compared. If the types of the members are different, the usual logic applies depending or not if conversion options were specified. Fields can be mapped to properties and vice-versa.
    Requirements

    Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

    See Also